package com.hanggold.ei;

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

import java.io.File;

/**
 * @author <a href="mailto:sunmch@163.com">smc</a>
 * @date 2019-09-23 15:24
 * @since 1.0.0
 **/
public class PPT2PDFTest {

    private static String PPT_FILE="H:" + File.separator + "lianjia.pptx";

    private static String PPT_FILE_="H:" + File.separator + "lianjia.pdf";

    public static void main(String[] args) throws Exception {

        long start = System.currentTimeMillis();

        Presentation presentation = new Presentation();

        presentation.loadFromFile(PPT_FILE);

        presentation.saveToFile(PPT_FILE_, FileFormat.PDF);

        presentation.dispose();

        long end = System.currentTimeMillis();

        System.out.printf("转换pdf花费时间 :  %d \n", (end - start));

        System.out.println("succ");
    }
}
